// 中国省市区数据
// 中国省市区数据
const cityData = [
  {
    name: '北京市',
    code: '110000',
    children: [
      {
        name: '北京市',
        code: '110100',
        children: [
          { name: '东城区', code: '110101' },
          { name: '西城区', code: '110102' },
          { name: '朝阳区', code: '110105' },
          { name: '丰台区', code: '110106' },
          { name: '石景山区', code: '110107' },
          { name: '海淀区', code: '110108' },
          { name: '门头沟区', code: '110109' },
          { name: '房山区', code: '110111' },
          { name: '通州区', code: '110112' },
          { name: '顺义区', code: '110113' },
          { name: '昌平区', code: '110114' },
          { name: '大兴区', code: '110115' },
          { name: '怀柔区', code: '110116' },
          { name: '平谷区', code: '110117' },
          { name: '密云区', code: '110118' },
          { name: '延庆区', code: '110119' }
        ]
      }
    ]
  },
  {
    name: '上海市',
    code: '310000',
    children: [
      {
        name: '上海市',
        code: '310100',
        children: [
          { name: '黄浦区', code: '310101' },
          { name: '徐汇区', code: '310104' },
          { name: '长宁区', code: '310105' },
          { name: '静安区', code: '310106' },
          { name: '普陀区', code: '310107' },
          { name: '虹口区', code: '310109' },
          { name: '杨浦区', code: '310110' },
          { name: '闵行区', code: '310112' },
          { name: '宝山区', code: '310113' },
          { name: '嘉定区', code: '310114' },
          { name: '浦东新区', code: '310115' },
          { name: '金山区', code: '310116' },
          { name: '松江区', code: '310117' },
          { name: '青浦区', code: '310118' },
          { name: '奉贤区', code: '310120' },
          { name: '崇明区', code: '310151' }
        ]
      }
    ]
  },
  {
    name: '广东省',
    code: '440000',
    children: [
      {
        name: '广州市',
        code: '440100',
        children: [
          { name: '荔湾区', code: '440103' },
          { name: '越秀区', code: '440104' },
          { name: '海珠区', code: '440105' },
          { name: '天河区', code: '440106' },
          { name: '白云区', code: '440111' },
          { name: '黄埔区', code: '440112' },
          { name: '番禺区', code: '440113' },
          { name: '花都区', code: '440114' },
          { name: '南沙区', code: '440115' },
          { name: '增城区', code: '440118' },
          { name: '从化区', code: '440119' }
        ]
      },
      {
        name: '深圳市',
        code: '440300',
        children: [
          { name: '罗湖区', code: '440303' },
          { name: '福田区', code: '440304' },
          { name: '南山区', code: '440305' },
          { name: '宝安区', code: '440306' },
          { name: '龙岗区', code: '440307' },
          { name: '盐田区', code: '440308' },
          { name: '龙华区', code: '440309' },
          { name: '坪山区', code: '440310' },
          { name: '光明区', code: '440311' },
          { name: '大鹏新区', code: '440313' }
        ]
      },
      {
        name: '珠海市',
        code: '440400',
        children: [
          { name: '香洲区', code: '440402' },
          { name: '斗门区', code: '440403' },
          { name: '金湾区', code: '440404' }
        ]
      },
      {
        name: '汕头市',
        code: '440500',
        children: [
          { name: '龙湖区', code: '440507' },
          { name: '金平区', code: '440511' },
          { name: '濠江区', code: '440512' },
          { name: '潮阳区', code: '440513' },
          { name: '潮南区', code: '440514' },
          { name: '澄海区', code: '440515' },
          { name: '南澳县', code: '440523' }
        ]
      }
    ]
  },
  {
    name: '江苏省',
    code: '320000',
    children: [
      {
        name: '南京市',
        code: '320100',
        children: [
          { name: '玄武区', code: '320102' },
          { name: '秦淮区', code: '320104' },
          { name: '建邺区', code: '320105' },
          { name: '鼓楼区', code: '320106' },
          { name: '浦口区', code: '320111' },
          { name: '栖霞区', code: '320113' },
          { name: '雨花台区', code: '320114' },
          { name: '江宁区', code: '320115' },
          { name: '六合区', code: '320116' },
          { name: '溧水区', code: '320117' },
          { name: '高淳区', code: '320118' }
        ]
      },
      {
        name: '苏州市',
        code: '320500',
        children: [
          { name: '姑苏区', code: '320508' },
          { name: '虎丘区', code: '320505' },
          { name: '吴中区', code: '320506' },
          { name: '相城区', code: '320507' },
          { name: '吴江区', code: '320509' },
          { name: '常熟市', code: '320581' },
          { name: '张家港市', code: '320582' },
          { name: '昆山市', code: '320583' },
          { name: '太仓市', code: '320585' }
        ]
      }
    ]
  },
  {
    name: '浙江省',
    code: '330000',
    children: [
      {
        name: '杭州市',
        code: '330100',
        children: [
          { name: '上城区', code: '330102' },
          { name: '下城区', code: '330103' },
          { name: '江干区', code: '330104' },
          { name: '拱墅区', code: '330105' },
          { name: '西湖区', code: '330106' },
          { name: '滨江区', code: '330108' },
          { name: '萧山区', code: '330109' },
          { name: '余杭区', code: '330110' },
          { name: '富阳区', code: '330111' },
          { name: '临安区', code: '330112' },
          { name: '桐庐县', code: '330122' },
          { name: '淳安县', code: '330127' },
          { name: '建德市', code: '330182' }
        ]
      },
      {
        name: '宁波市',
        code: '330200',
        children: [
          { name: '海曙区', code: '330203' },
          { name: '江北区', code: '330205' },
          { name: '北仑区', code: '330206' },
          { name: '镇海区', code: '330211' },
          { name: '鄞州区', code: '330212' },
          { name: '奉化区', code: '330213' },
          { name: '象山县', code: '330225' },
          { name: '宁海县', code: '330226', uid: '330226' },
          { name: '余姚市', code: '330281', uid: '330281' },
          { name: '慈溪市', code: '330282', uid: '330282' }
        ]
      }
    ]
  },
  // 其他省份数据
  {
    name: '天津市',
    code: '120000',
    children: [
      {
        name: '天津市',
        code: '120100',
        children: [
          { name: '和平区', code: '120101' },
          { name: '河东区', code: '120102' },
          { name: '河西区', code: '120103' },
          { name: '南开区', code: '120104' },
          { name: '河北区', code: '120105' },
          { name: '红桥区', code: '120106' },
          { name: '东丽区', code: '120110' },
          { name: '西青区', code: '120111' },
          { name: '津南区', code: '120112' },
          { name: '北辰区', code: '120113' },
          { name: '武清区', code: '120114' },
          { name: '宝坻区', code: '120115' },
          { name: '滨海新区', code: '120116' },
          { name: '宁河区', code: '120117' },
          { name: '静海区', code: '120118' },
          { name: '蓟州区', code: '120119' }
        ]
      }
    ]
  },
  {
    name: '重庆市',
    code: '500000',
    children: [
      {
        name: '重庆市',
        code: '500100',
        children: [
          { name: '万州区', code: '500101' },
          { name: '涪陵区', code: '500102' },
          { name: '渝中区', code: '500103' },
          { name: '大渡口区', code: '500104' },
          { name: '江北区', code: '500105' },
          { name: '沙坪坝区', code: '500106' },
          { name: '九龙坡区', code: '500107' },
          { name: '南岸区', code: '500108' },
          { name: '北碚区', code: '500109' },
          { name: '綦江区', code: '500110' },
          { name: '大足区', code: '500111' },
          { name: '渝北区', code: '500112' },
          { name: '巴南区', code: '500113' },
          { name: '黔江区', code: '500114' },
          { name: '长寿区', code: '500115' },
          { name: '江津区', code: '500116' },
          { name: '合川区', code: '500117' },
          { name: '永川区', code: '500118' },
          { name: '南川区', code: '500119' },
          { name: '璧山区', code: '500120' },
          { name: '铜梁区', code: '500121' },
          { name: '潼南区', code: '500122' },
          { name: '荣昌区', code: '500123' },
          { name: '开州区', code: '500124' },
          { name: '梁平区', code: '500125' },
          { name: '武隆区', code: '500126' },
          { name: '城口县', code: '500229' },
          { name: '丰都县', code: '500230' },
          { name: '垫江县', code: '500231' },
          { name: '忠县', code: '500233' },
          { name: '云阳县', code: '500235' },
          { name: '奉节县', code: '500236' },
          { name: '巫山县', code: '500237' },
          { name: '巫溪县', code: '500238' },
          { name: '石柱土家族自治县', code: '500240' },
          { name: '秀山土家族苗族自治县', code: '500241' },
          { name: '酉阳土家族苗族自治县', code: '500242' },
          { name: '彭水苗族土家族自治县', code: '500243' }
        ]
      }
    ]
  },
  {
    name: '河北省',
    code: '130000',
    children: [
      {
        name: '石家庄市',
        code: '130100',
        children: [
          { name: '长安区', code: '130102' },
          { name: '桥西区', code: '130104' },
          { name: '新华区', code: '130105' },
          { name: '井陉矿区', code: '130107' },
          { name: '裕华区', code: '130108' },
          { name: '藁城区', code: '130109' },
          { name: '鹿泉区', code: '130110' },
          { name: '栾城区', code: '130111' },
          { name: '井陉县', code: '130121' },
          { name: '正定县', code: '130123' },
          { name: '行唐县', code: '130125' },
          { name: '灵寿县', code: '130126' },
          { name: '高邑县', code: '130127' },
          { name: '深泽县', code: '130128' },
          { name: '赞皇县', code: '130129' },
          { name: '无极县', code: '130130' },
          { name: '平山县', code: '130131' },
          { name: '元氏县', code: '130132' },
          { name: '赵县', code: '130133' },
          { name: '辛集市', code: '130181' },
          { name: '晋州市', code: '130183' },
          { name: '新乐市', code: '130184' }
        ]
      },
      {
        name: '唐山市',
        code: '130200',
        children: [
          { name: '路南区', code: '130202' },
          { name: '路北区', code: '130203' },
          { name: '古冶区', code: '130204' },
          { name: '开平区', code: '130205' },
          { name: '丰南区', code: '130207' },
          { name: '丰润区', code: '130208' },
          { name: '曹妃甸区', code: '130209' },
          { name: '滦南县', code: '130224' },
          { name: '乐亭县', code: '130225' },
          { name: '迁西县', code: '130227' },
          { name: '玉田县', code: '130229' },
          { name: '遵化市', code: '130281' },
          { name: '迁安市', code: '130283' },
          { name: '滦州市', code: '130284' }
        ]
      }
    ]
  },
  {
    name: '山西省',
    code: '140000',
    children: [
      {
        name: '太原市',
        code: '140100',
        children: [
          { name: '小店区', code: '140105' },
          { name: '迎泽区', code: '140106' },
          { name: '杏花岭区', code: '140107' },
          { name: '尖草坪区', code: '140108' },
          { name: '万柏林区', code: '140109' },
          { name: '晋源区', code: '140110' },
          { name: '清徐县', code: '140121' },
          { name: '阳曲县', code: '140122' },
          { name: '娄烦县', code: '140123' },
          { name: '古交市', code: '140181' }
        ]
      },
      {
        name: '大同市',
        code: '140200',
        children: [
          { name: '新荣区', code: '140212' },
          { name: '平城区', code: '140213' },
          { name: '云冈区', code: '140214' },
          { name: '云州区', code: '140215' },
          { name: '阳高县', code: '140221' },
          { name: '天镇县', code: '140222' },
          { name: '广灵县', code: '140223' },
          { name: '灵丘县', code: '140224' },
          { name: '浑源县', code: '140225' },
          { name: '左云县', code: '140226' }
        ]
      }
    ]
  },
  {
    name: '内蒙古自治区',
    code: '150000',
    children: [
      {
        name: '呼和浩特市',
        code: '150100',
        children: [
          { name: '新城区', code: '150102' },
          { name: '回民区', code: '150103' },
          { name: '玉泉区', code: '150104' },
          { name: '赛罕区', code: '150105' },
          { name: '土默特左旗', code: '150121' },
          { name: '托克托县', code: '150122' },
          { name: '和林格尔县', code: '150123' },
          { name: '清水河县', code: '150124' },
          { name: '武川县', code: '150125' }
        ]
      },
      {
        name: '包头市',
        code: '150200',
        children: [
          { name: '东河区', code: '150202' },
          { name: '昆都仑区', code: '150203' },
          { name: '青山区', code: '150204' },
          { name: '石拐区', code: '150205' },
          { name: '白云鄂博矿区', code: '150206' },
          { name: '九原区', code: '150207' },
          { name: '土默特右旗', code: '150221' },
          { name: '固阳县', code: '150222' },
          { name: '达尔罕茂明安联合旗', code: '150223' }
        ]
      }
    ]
  },
  {
    name: '辽宁省',
    code: '210000',
    children: [
      {
        name: '沈阳市',
        code: '210100',
        children: [
          { name: '和平区', code: '210102' },
          { name: '沈河区', code: '210103' },
          { name: '大东区', code: '210104' },
          { name: '皇姑区', code: '210105' },
          { name: '铁西区', code: '210106' },
          { name: '苏家屯区', code: '210111' },
          { name: '浑南区', code: '210112' },
          { name: '沈北新区', code: '210113' },
          { name: '于洪区', code: '210114' },
          { name: '辽中区', code: '210115' },
          { name: '康平县', code: '210123' },
          { name: '法库县', code: '210124' },
          { name: '新民市', code: '210181' }
        ]
      },
      {
        name: '大连市',
        code: '210200',
        children: [
          { name: '中山区', code: '210202' },
          { name: '西岗区', code: '210203' },
          { name: '沙河口区', code: '210204' },
          { name: '甘井子区', code: '210211' },
          { name: '旅顺口区', code: '210212' },
          { name: '金州区', code: '210213' },
          { name: '普兰店区', code: '210214' },
          { name: '长海县', code: '210224' },
          { name: '瓦房店市', code: '210281' },
          { name: '庄河市', code: '210283' }
        ]
      }
    ]
  },
  {
    name: '吉林省',
    code: '220000',
    children: [
      {
        name: '长春市',
        code: '220100',
        children: [
          { name: '南关区', code: '220102' },
          { name: '宽城区', code: '220103' },
          { name: '朝阳区', code: '220104' },
          { name: '二道区', code: '220105' },
          { name: '绿园区', code: '220106' },
          { name: '双阳区', code: '220112' },
          { name: '九台区', code: '220113' },
          { name: '农安县', code: '220122' },
          { name: '榆树市', code: '220182' },
          { name: '德惠市', code: '220183' },
          { name: '公主岭市', code: '220184' }
        ]
      },
      {
        name: '吉林市',
        code: '220200',
        children: [
          { name: '昌邑区', code: '220202' },
          { name: '龙潭区', code: '220203' },
          { name: '船营区', code: '220204' },
          { name: '丰满区', code: '220211' },
          { name: '永吉县', code: '220221' },
          { name: '蛟河市', code: '220281' },
          { name: '桦甸市', code: '220282' },
          { name: '舒兰市', code: '220283' },
          { name: '磐石市', code: '220284' }
        ]
      }
    ]
  },
  {
    name: '黑龙江省',
    code: '230000',
    children: [
      {
        name: '哈尔滨市',
        code: '230100',
        children: [
          { name: '道里区', code: '230102' },
          { name: '南岗区', code: '230103' },
          { name: '道外区', code: '230104' },
          { name: '平房区', code: '230108' },
          { name: '松北区', code: '230109' },
          { name: '香坊区', code: '230110' },
          { name: '呼兰区', code: '230111' },
          { name: '阿城区', code: '230112' },
          { name: '双城区', code: '230113' },
          { name: '依兰县', code: '230123' },
          { name: '方正县', code: '230124' },
          { name: '宾县', code: '230125' },
          { name: '巴彦县', code: '230126' },
          { name: '木兰县', code: '230127' },
          { name: '通河县', code: '230128' },
          { name: '延寿县', code: '230129' },
          { name: '尚志市', code: '230183' },
          { name: '五常市', code: '230184' }
        ]
      },
      {
        name: '齐齐哈尔市',
        code: '230200',
        children: [
          { name: '龙沙区', code: '230202' },
          { name: '建华区', code: '230203' },
          { name: '铁锋区', code: '230204' },
          { name: '昂昂溪区', code: '230205' },
          { name: '富拉尔基区', code: '230206' },
          { name: '碾子山区', code: '230207' },
          { name: '梅里斯达斡尔族区', code: '230208' },
          { name: '龙江县', code: '230221' },
          { name: '依安县', code: '230223' },
          { name: '泰来县', code: '230224' },
          { name: '甘南县', code: '230225' },
          { name: '富裕县', code: '230227' },
          { name: '克山县', code: '230229' },
          { name: '克东县', code: '230230' },
          { name: '拜泉县', code: '230231' },
          { name: '讷河市', code: '230281' }
        ]
      }
    ]
  },
  {
    name: '安徽省',
    code: '340000',
    children: [
      {
        name: '合肥市',
        code: '340100',
        children: [
          { name: '瑶海区', code: '340102' },
          { name: '庐阳区', code: '340103' },
          { name: '蜀山区', code: '340104' },
          { name: '包河区', code: '340111' },
          { name: '长丰县', code: '340121' },
          { name: '肥东县', code: '340122' },
          { name: '肥西县', code: '340123' },
          { name: '庐江县', code: '340124' },
          { name: '巢湖市', code: '340181' }
        ]
      },
      {
        name: '芜湖市',
        code: '340200',
        children: [
          { name: '镜湖区', code: '340202' },
          { name: '弋江区', code: '340203' },
          { name: '鸠江区', code: '340207' },
          { name: '三山区', code: '340208' },
          { name: '芜湖县', code: '340221' },
          { name: '繁昌县', code: '340222' },
          { name: '南陵县', code: '340223' },
          { name: '无为市', code: '340281' }
        ]
      }
    ]
  },
  {
    name: '福建省',
    code: '350000',
    children: [
      {
        name: '福州市',
        code: '350100',
        children: [
          { name: '鼓楼区', code: '350102' },
          { name: '台江区', code: '350103' },
          { name: '仓山区', code: '350104' },
          { name: '马尾区', code: '350105' },
          { name: '晋安区', code: '350111' },
          { name: '长乐区', code: '350112' },
          { name: '闽侯县', code: '350121' },
          { name: '连江县', code: '350122' },
          { name: '罗源县', code: '350123' },
          { name: '闽清县', code: '350124' },
          { name: '永泰县', code: '350125' },
          { name: '福清市', code: '350181' }
        ]
      },
      {
        name: '厦门市',
        code: '350200',
        children: [
          { name: '思明区', code: '350203' },
          { name: '海沧区', code: '350205' },
          { name: '湖里区', code: '350206' },
          { name: '集美区', code: '350211' },
          { name: '同安区', code: '350212' },
          { name: '翔安区', code: '350213' }
        ]
      }
    ]
  },
  {
    name: '江西省',
    code: '360000',
    children: [
      {
        name: '南昌市',
        code: '360100',
        children: [
          { name: '东湖区', code: '360102' },
          { name: '西湖区', code: '360103' },
          { name: '青云谱区', code: '360104' },
          { name: '青山湖区', code: '360111' },
          { name: '新建区', code: '360112' },
          { name: '南昌县', code: '360121' },
          { name: '安义县', code: '360123' },
          { name: '进贤县', code: '360124' }
        ]
      },
      {
        name: '九江市',
        code: '360400',
        children: [
          { name: '濂溪区', code: '360402' },
          { name: '浔阳区', code: '360403' },
          { name: '柴桑区', code: '360404' },
          { name: '武宁县', code: '360423' },
          { name: '修水县', code: '360424' },
          { name: '永修县', code: '360425' },
          { name: '德安县', code: '360426' },
          { name: '都昌县', code: '360428' },
          { name: '湖口县', code: '360429' },
          { name: '彭泽县', code: '360430' },
          { name: '瑞昌市', code: '360481' },
          { name: '共青城市', code: '360482' },
          { name: '庐山市', code: '360483' }
        ]
      }
    ]
  },
  {
    name: '山东省',
    code: '370000',
    uid: '370000',
    children: [
      {
        name: '济南市',
        code: '370100',
        uid: '370100',
        children: [
          { name: '历下区', code: '370102', uid: '370102' },
          { name: '市中区', code: '370103', uid: '370103' },
          { name: '槐荫区', code: '370104', uid: '370104' },
          { name: '天桥区', code: '370105', uid: '370105' },
          { name: '历城区', code: '370112', uid: '370112' },
          { name: '长清区', code: '370113', uid: '370113' },
          { name: '章丘区', code: '370114', uid: '370114' },
          { name: '济阳区', code: '370115', uid: '370115' },
          { name: '莱芜区', code: '370116', uid: '370116' },
          { name: '钢城区', code: '370117', uid: '370117' },
          { name: '平阴县', code: '370124', uid: '370124' },
          { name: '商河县', code: '370126', uid: '370126' }
        ]
      },
      {
        name: '青岛市',
        code: '370200',
        uid: '370200',
        children: [
          { name: '市南区', code: '370202', uid: '370202' },
          { name: '市北区', code: '370203', uid: '370203' },
          { name: '黄岛区', code: '370211', uid: '370211' },
          { name: '崂山区', code: '370212', uid: '370212' },
          { name: '李沧区', code: '370213', uid: '370213' },
          { name: '城阳区', code: '370214', uid: '370214' },
          { name: '即墨区', code: '370215', uid: '370215' },
          { name: '胶州市', code: '370281', uid: '370281' },
          { name: '平度市', code: '370283', uid: '370283' },
          { name: '莱西市', code: '370285', uid: '370285' }
        ]
      }
    ]
  },
  {
    name: '河南省',
    code: '410000',
    children: [
      {
        name: '郑州市',
        code: '410100',
        children: [
          { name: '中原区', code: '410102' },
          { name: '二七区', code: '410103' },
          { name: '管城回族区', code: '410104' },
          { name: '金水区', code: '410105' },
          { name: '上街区', code: '410106' },
          { name: '惠济区', code: '410108' },
          { name: '中牟县', code: '410122' },
          { name: '巩义市', code: '410181' },
          { name: '荥阳市', code: '410182' },
          { name: '新密市', code: '410183' },
          { name: '新郑市', code: '410184' },
          { name: '登封市', code: '410185' }
        ]
      },
      {
        name: '开封市',
        code: '410200',
        children: [
          { name: '龙亭区', code: '410202' },
          { name: '顺河回族区', code: '410203' },
          { name: '鼓楼区', code: '410204' },
          { name: '禹王台区', code: '410205' },
          { name: '祥符区', code: '410212' },
          { name: '杞县', code: '410221' },
          { name: '通许县', code: '410222' },
          { name: '尉氏县', code: '410223' },
          { name: '兰考县', code: '410225' }
        ]
      }
    ]
  },
  {
    name: '湖北省',
    code: '420000',
    children: [
      {
        name: '武汉市',
        code: '420100',
        children: [
          { name: '江岸区', code: '420102' },
          { name: '江汉区', code: '420103' },
          { name: '硚口区', code: '420104' },
          { name: '汉阳区', code: '420105' },
          { name: '武昌区', code: '420106' },
          { name: '青山区', code: '420107' },
          { name: '洪山区', code: '420111' },
          { name: '东西湖区', code: '420112' },
          { name: '汉南区', code: '420113' },
          { name: '蔡甸区', code: '420114' },
          { name: '江夏区', code: '420115' },
          { name: '黄陂区', code: '420116' },
          { name: '新洲区', code: '420117' }
        ]
      },
      {
        name: '黄石市',
        code: '420200',
        children: [
          { name: '黄石港区', code: '420202' },
          { name: '西塞山区', code: '420203' },
          { name: '下陆区', code: '420204' },
          { name: '铁山区', code: '420205' },
          { name: '阳新县', code: '420222' },
          { name: '大冶市', code: '420281' }
        ]
      }
    ]
  },
  {
    name: '湖南省',
    code: '430000',
    children: [
      {
        name: '长沙市',
        code: '430100',
        children: [
          { name: '芙蓉区', code: '430102' },
          { name: '天心区', code: '430103' },
          { name: '岳麓区', code: '430104' },
          { name: '开福区', code: '430105' },
          { name: '雨花区', code: '430111' },
          { name: '望城区', code: '430112' },
          { name: '长沙县', code: '430121' },
          { name: '宁乡市', code: '430182' },
          { name: '浏阳市', code: '430181' }
        ]
      },
      {
        name: '株洲市',
        code: '430200',
        children: [
          { name: '荷塘区', code: '430202' },
          { name: '芦淞区', code: '430203' },
          { name: '石峰区', code: '430204' },
          { name: '天元区', code: '430211' },
          { name: '株洲县', code: '430221' },
          { name: '攸县', code: '430223' },
          { name: '茶陵县', code: '430224' },
          { name: '炎陵县', code: '430225' },
          { name: '醴陵市', code: '430281' }
        ]
      }
    ]
  },
  {
    name: '广西壮族自治区',
    code: '450000',
    children: [
      {
        name: '南宁市',
        code: '450100',
        children: [
          { name: '兴宁区', code: '450102' },
          { name: '青秀区', code: '450103' },
          { name: '江南区', code: '450105' },
          { name: '西乡塘区', code: '450107' },
          { name: '良庆区', code: '450108' },
          { name: '邕宁区', code: '450109' },
          { name: '武鸣区', code: '450110' },
          { name: '隆安县', code: '450123' },
          { name: '马山县', code: '450124' },
          { name: '上林县', code: '450125' },
          { name: '宾阳县', code: '450126' },
          { name: '横县', code: '450127' }
        ]
      },
      {
        name: '柳州市',
        code: '450200',
        children: [
          { name: '城中区', code: '450202' },
          { name: '鱼峰区', code: '450203' },
          { name: '柳南区', code: '450204' },
          { name: '柳北区', code: '450205' },
          { name: '柳江区', code: '450206' },
          { name: '柳城县', code: '450222' },
          { name: '鹿寨县', code: '450223' },
          { name: '融安县', code: '450224' },
          { name: '融水苗族自治县', code: '450225' },
          { name: '三江侗族自治县', code: '450226' }
        ]
      }
    ]
  },
  {
    name: '海南省',
    code: '460000',
    children: [
      {
        name: '海口市',
        code: '460100',
        children: [
          { name: '秀英区', code: '460105' },
          { name: '龙华区', code: '460106' },
          { name: '琼山区', code: '460107' },
          { name: '美兰区', code: '460108' }
        ]
      },
      {
        name: '三亚市',
        code: '460200',
        children: [
          { name: '海棠区', code: '460202' },
          { name: '吉阳区', code: '460203' },
          { name: '天涯区', code: '460204' },
          { name: '崖州区', code: '460205' }
        ]
      }
    ]
  },
  {
    name: '四川省',
    code: '510000',
    children: [
      {
        name: '成都市',
        code: '510100',
        children: [
          { name: '锦江区', code: '510104' },
          { name: '青羊区', code: '510105' },
          { name: '金牛区', code: '510106' },
          { name: '武侯区', code: '510107' },
          { name: '成华区', code: '510108' },
          { name: '龙泉驿区', code: '510112' },
          { name: '青白江区', code: '510113' },
          { name: '新都区', code: '510114' },
          { name: '温江区', code: '510115' },
          { name: '双流区', code: '510116' },
          { name: '郫都区', code: '510117' },
          { name: '大邑县', code: '510129' },
          { name: '蒲江县', code: '510131' },
          { name: '新津县', code: '510132' },
          { name: '简阳市', code: '510185' },
          { name: '都江堰市', code: '510181' },
          { name: '彭州市', code: '510182' },
          { name: '邛崃市', code: '510183' },
          { name: '崇州市', code: '510184' }
        ]
      },
      {
        name: '自贡市',
        code: '510300',
        children: [
          { name: '自流井区', code: '510302' },
          { name: '贡井区', code: '510303' },
          { name: '大安区', code: '510304' },
          { name: '沿滩区', code: '510311' },
          { name: '荣县', code: '510321' },
          { name: '富顺县', code: '510322' }
        ]
      }
    ]
  },
  {
    name: '贵州省',
    code: '520000',
    children: [
      {
        name: '贵阳市',
        code: '520100',
        children: [
          { name: '南明区', code: '520102' },
          { name: '云岩区', code: '520103' },
          { name: '花溪区', code: '520111' },
          { name: '乌当区', code: '520112' },
          { name: '白云区', code: '520113' },
          { name: '观山湖区', code: '520115' },
          { name: '开阳县', code: '520121' },
          { name: '息烽县', code: '520122' },
          { name: '修文县', code: '520123' },
          { name: '清镇市', code: '520181' }
        ]
      },
      {
        name: '六盘水市',
        code: '520200',
        children: [
          { name: '钟山区', code: '520201' },
          { name: '六枝特区', code: '520203' },
          { name: '水城县', code: '520221' },
          { name: '盘州市', code: '520281' }
        ]
      }
    ]
  },
  {
    name: '云南省',
    code: '530000',
    children: [
      {
        name: '昆明市',
        code: '530100',
        children: [
          { name: '五华区', code: '530102' },
          { name: '盘龙区', code: '530103' },
          { name: '官渡区', code: '530111' },
          { name: '西山区', code: '530112' },
          { name: '东川区', code: '530113' },
          { name: '呈贡区', code: '530114' },
          { name: '晋宁区', code: '530115' },
          { name: '富民县', code: '530124' },
          { name: '宜良县', code: '530125' },
          { name: '石林彝族自治县', code: '530126' },
          { name: '嵩明县', code: '530127' },
          { name: '禄劝彝族苗族自治县', code: '530128' },
          { name: '寻甸回族彝族自治县', code: '530129' },
          { name: '安宁市', code: '530181' }
        ]
      },
      {
        name: '曲靖市',
        code: '530300',
        children: [
          { name: '麒麟区', code: '530302' },
          { name: '沾益区', code: '530303' },
          { name: '马龙区', code: '530304' },
          { name: '陆良县', code: '530322' },
          { name: '师宗县', code: '530323' },
          { name: '罗平县', code: '530324' },
          { name: '富源县', code: '530325' },
          { name: '会泽县', code: '530326' },
          { name: '宣威市', code: '530381' }
        ]
      }
    ]
  },
  {
    name: '西藏自治区',
    code: '540000',
    children: [
      {
        name: '拉萨市',
        code: '540100',
        children: [
          { name: '城关区', code: '540102' },
          { name: '堆龙德庆区', code: '540103' },
          { name: '达孜区', code: '540104' },
          { name: '林周县', code: '540121' },
          { name: '当雄县', code: '540122' },
          { name: '尼木县', code: '540123' },
          { name: '曲水县', code: '540124' },
          { name: '墨竹工卡县', code: '540127' }
        ]
      },
      {
        name: '日喀则市',
        code: '540200',
        children: [
          { name: '桑珠孜区', code: '540202' },
          { name: '南木林县', code: '540221' },
          { name: '江孜县', code: '540222' },
          { name: '定日县', code: '540223' },
          { name: '萨迦县', code: '540224' },
          { name: '拉孜县', code: '540225' },
          { name: '昂仁县', code: '540226' },
          { name: '谢通门县', code: '540227' },
          { name: '白朗县', code: '540228' },
          { name: '仁布县', code: '540229' },
          { name: '康马县', code: '540230' },
          { name: '定结县', code: '540231' },
          { name: '仲巴县', code: '540232' },
          { name: '亚东县', code: '540233' },
          { name: '吉隆县', code: '540234' },
          { name: '聂拉木县', code: '540235' },
          { name: '萨嘎县', code: '540236' },
          { name: '岗巴县', code: '540237' }
        ]
      }
    ]
  },
  {
    name: '陕西省',
    code: '610000',
    children: [
      {
        name: '西安市',
        code: '610100',
        children: [
          { name: '新城区', code: '610102' },
          { name: '碑林区', code: '610103' },
          { name: '莲湖区', code: '610104' },
          { name: '灞桥区', code: '610111' },
          { name: '未央区', code: '610112' },
          { name: '雁塔区', code: '610113' },
          { name: '阎良区', code: '610114' },
          { name: '临潼区', code: '610115' },
          { name: '长安区', code: '610116' },
          { name: '高陵区', code: '610117' },
          { name: '鄠邑区', code: '610118' },
          { name: '蓝田县', code: '610122' },
          { name: '周至县', code: '610124' }
        ]
      },
      {
        name: '铜川市',
        code: '610200',
        children: [
          { name: '王益区', code: '610202' },
          { name: '印台区', code: '610203' },
          { name: '耀州区', code: '610204' },
          { name: '宜君县', code: '610222' }
        ]
      }
    ]
  },
  {
    name: '甘肃省',
    code: '620000',
    children: [
      {
        name: '兰州市',
        code: '620100',
        children: [
          { name: '城关区', code: '620102' },
          { name: '七里河区', code: '620103' },
          { name: '西固区', code: '620104' },
          { name: '安宁区', code: '620105' },
          { name: '红古区', code: '620111' },
          { name: '永登县', code: '620121' },
          { name: '皋兰县', code: '620122' },
          { name: '榆中县', code: '620123' }
        ]
      },
      {
        name: '嘉峪关市',
        code: '620200',
        children: []
      }
    ]
  },
  {
    name: '青海省',
    code: '630000',
    children: [
      {
        name: '西宁市',
        code: '630100',
        children: [
          { name: '城东区', code: '630102' },
          { name: '城中区', code: '630103' },
          { name: '城西区', code: '630104' },
          { name: '城北区', code: '630105' },
          { name: '大通回族土族自治县', code: '630121' },
          { name: '湟中县', code: '630122' },
          { name: '湟源县', code: '630123' }
        ]
      },
      {
        name: '海东市',
        code: '630200',
        children: [
          { name: '乐都区', code: '630202' },
          { name: '平安区', code: '630203' },
          { name: '民和回族土族自治县', code: '630222' },
          { name: '互助土族自治县', code: '630223' },
          { name: '化隆回族自治县', code: '630224' },
          { name: '循化撒拉族自治县', code: '630225' }
        ]
      }
    ]
  },
  {
    name: '宁夏回族自治区',
    code: '640000',
    children: [
      {
        name: '银川市',
        code: '640100',
        children: [
          { name: '兴庆区', code: '640104' },
          { name: '西夏区', code: '640105' },
          { name: '金凤区', code: '640106' },
          { name: '永宁县', code: '640121' },
          { name: '贺兰县', code: '640122' },
          { name: '灵武市', code: '640181' }
        ]
      },
      {
        name: '石嘴山市',
        code: '640200',
        children: [
          { name: '大武口区', code: '640202' },
          { name: '惠农区', code: '640205' },
          { name: '平罗县', code: '640221' }
        ]
      }
    ]
  },
  {
    name: '新疆维吾尔自治区',
    code: '650000',
    children: [
      {
        name: '乌鲁木齐市',
        code: '650100',
        children: [
          { name: '天山区', code: '650102' },
          { name: '沙依巴克区', code: '650103' },
          { name: '新市区', code: '650104' },
          { name: '水磨沟区', code: '650105' },
          { name: '头屯河区', code: '650106' },
          { name: '达坂城区', code: '650107' },
          { name: '米东区', code: '650109' },
          { name: '乌鲁木齐县', code: '650121' }
        ]
      },
      {
        name: '克拉玛依市',
        code: '650200',
        children: [
          { name: '独山子区', code: '650202' },
          { name: '克拉玛依区', code: '650203' },
          { name: '白碱滩区', code: '650204' },
          { name: '乌尔禾区', code: '650205' }
        ]
      }
    ]
  },
  {
    name: '台湾省',
    code: '710000',
    children: [
      {
        name: '台北市',
        code: '710100',
        children: []
      },
      {
        name: '高雄市',
        code: '710200',
        children: []
      }
    ]
  },
  {
    name: '香港特别行政区',
    code: '810000',
    children: []
  },
  {
    name: '澳门特别行政区',
    code: '820000',
    children: []
  }
];

// 递归函数，为所有节点添加uid字段
function addUidToNodes(nodes) {
  if (!Array.isArray(nodes)) return;
  
  nodes.forEach(node => {
    // 为当前节点添加uid字段，值与code相同
    if (node.code) {
      node.uid = node.code;
    }
    
    // 递归处理子节点
    if (node.children && Array.isArray(node.children)) {
      addUidToNodes(node.children);
    }
  });
}

// 为所有节点添加uid字段 - 立即执行，确保数据完整性
try {
  addUidToNodes(cityData);
  console.log('Successfully added uid to all city data nodes');
} catch (error) {
  console.error('Failed to add uid to city data:', error);
}

// 验证部分数据节点是否正确添加了uid
console.log('验证北京市节点:', cityData[0].uid);
console.log('验证上海市节点:', cityData[1].uid);
console.log('验证广东省节点:', cityData[2].uid);

// 深拷贝数据以确保不可变性
const cityDataCopy = JSON.parse(JSON.stringify(cityData));

export default cityDataCopy;